package com.sailors.common.task.provider.application.aggregation;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sailors.common.task.provider.faced.model.dto.execute.FileTaskCreateExecuteDto;
import com.sailors.common.task.provider.faced.model.dto.execute.FileTaskFailedExecuteDto;
import com.sailors.common.task.provider.faced.model.dto.execute.RefreshProcessExecuteDto;
import com.sailors.common.task.provider.faced.model.dto.query.WebFileTaskQueryDto;
import com.sailors.common.task.provider.faced.model.vo.*;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * File task aggregation
 *
 * @description:
 * @author: cyj
 * @date 2023 -02-22 00:18:51
 */
public interface IFileTaskAggregation {
    Page<FileTaskLogDetailVo> page(WebFileTaskQueryDto webFileTaskQueryDto);

    FileTaskLogDetailVo get(Long id);

    List<FileTaskLogDetailVo> nowProcess(List<Long> ids);

    List<String> bussiness();

    /**
     * Create long
     *
     * @param fileTaskCreateExecuteDto file task create execute dto
     * @return the long
     */
    Long create(FileTaskCreateExecuteDto fileTaskCreateExecuteDto) throws ExecutionException, InterruptedException;

    /**
     * Refresh process *
     *
     * @param refreshProcessExecuteDto refresh process execute dto
     */
    void refreshProcess(RefreshProcessExecuteDto refreshProcessExecuteDto);

    /**
     * Failed *
     *
     * @param fileTaskFailedExecuteDto file task failed execute dto
     */
    void failed(FileTaskFailedExecuteDto fileTaskFailedExecuteDto) throws ExecutionException, InterruptedException;
}
